<template>
  <div class="pagss">
    <div style="height: 20px;"></div>
    <Navvz></Navvz>
    <el-row>

      <el-col :span="24">
        <el-row>
          <el-col :span="24">
            <div class="panel-group2">
              <div class="f_20 f_bold" style="margin-bottom: 20px;">版本列表</div>

              <el-tabs v-model="activeName" @tab-click="handleClick">
                <!-- 正式服列表++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                <el-tab-pane label="版本" name="first">

                  <div class=" row_a_c mb_20">
                    <div class="row_a_c mr20">
                      <div class="shuxia"></div>
                      <div>版本配置</div>
                    </div>
                    <el-button class="scwj color_b_3FC1C9 color_fff" size="mini" @click="handleAddJust">上传</el-button>
                    <el-button icon="el-icon-refresh" size="mini" @click="shuaxin()">刷新</el-button>
                  </div>

                  <el-table :data="tableData" style="width: 100%" v-loading="loading" ref="table">
                    <el-table-column header-align="center" align="center" prop="ulid" label="游戏id"></el-table-column>
                    <el-table-column header-align align="center" prop="title" label="游戏名"></el-table-column>
                    <el-table-column header-align="center" align="center" prop="logo" label="logo">
                      <template slot-scope="scope">
                        <img :src="scope.row.logo" width="50" />
                      </template>
                    </el-table-column>
                    <el-table-column header-align="center" align="center" prop="created_at" label="上次更新"></el-table-column>
                    <el-table-column header-align="center" align="center" prop="remark" label="备注"></el-table-column>

                    <el-table-column header-align="center" align="left" label="操作" width="410">
                      <template slot-scope="scope">
                        <div class="row ">
                          <el-button style="background: #EF4F19;color: #fff;" size="small" @click="modifySecretFuc(scope.row)">重置密匙</el-button>
                          <el-button style="background: #20CCC2;color: #fff;margin-left: 10px;" size="small" @click="gxzy(scope.row)">更新资源</el-button>
                          <el-button v-if="scope.row.evaluating==null" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small" @click="handleUpdateEva(scope.row,1)">申请评测</el-button>
                          <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==1" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small" @click="handleUpdateEva(scope.row,2)">已申请评测</el-button>
                          <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==2" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small" @click="handleUpdateEva(scope.row,2)">评测通过</el-button>
                          <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==3" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small" @click="handleUpdateEva(scope.row,1)">评测未通过</el-button>
                          <div>
                            <el-button v-if="scope.row.evaluating==null" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small">申请渠道</el-button>
                            <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==1" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small">等待渠道接入</el-button>
                            <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==2" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small">联运中</el-button>
                            <el-button v-if="scope.row.evaluating && scope.row.evaluating.channel_state==3" style="background: #306EF2;color: #fff;margin-left: 10px;width: 100px;" size="small">申请渠道</el-button>
                          </div>
                        </div>
                      </template>
                    </el-table-column>

                  </el-table>




                </el-tab-pane>
                <!-- 正式服列表============================================================== -->

                <el-tab-pane label="首包" name="second">
                  <div class=" row_a_c mb_20">
                    <div class="row_a_c mr20">
                      <div class="shuxia"></div>
                      <div>首包(packageres)资源配置</div>
                    </div>
                    <el-button class="scwj color_b_3FC1C9 color_fff" size="mini" @click="handleUpdateRe">上传</el-button>
                    <el-button icon="el-icon-refresh" size="mini" @click="getResVeList()">刷新</el-button>
                  </div>

                  <el-table :data="tableDataResVe" style="width: 100%" v-loading="loading" ref="table">
                    <el-table-column header-align="center" align="center" prop="ulid" label="标识"></el-table-column>
                    <el-table-column header-align align="center" prop="title" label="资源名称"></el-table-column>
                    <el-table-column header-align align="center" prop="size" label="资源大小"></el-table-column>

                    <el-table-column header-align="center" align="center" prop="state" label="状态">
                      <template slot-scope="scope">
                        <div v-if="scope.row.state==0">禁用</div>
                        <div v-if="scope.row.state==1">解析中</div>
                        <div v-if="scope.row.state==2">解析成功</div>
                        <div v-if="scope.row.state==3">解析失败</div>
                      </template>
                    </el-table-column>

                    <el-table-column header-align="center" align="center" prop="update_type" label="更新类型">
                      <template slot-scope="scope">
                        <div v-if="scope.row.update_type==1">全量</div>
                        <div v-if="scope.row.update_type==2">增量</div>
                      </template>
                    </el-table-column>
                    <el-table-column header-align="center" align="center" prop="created_at" label="上传时间"></el-table-column>
                    <el-table-column header-align="center" align="center" label="操作" width="80">
                      <template slot-scope="scope">
                        <div class="row ">
                          <el-button style="background: #EF4F19;color: #fff;" size="small" @click="resVeDeleteFuc(scope.row)">删除</el-button>
                        </div>
                      </template>
                    </el-table-column>

                  </el-table>
                </el-tab-pane>



                <el-tab-pane label="微端" name="third">

                  <div class=" row_a_c mb_20">
                    <div class="row_a_c mr20">
                      <div class="shuxia"></div>
                      <div>微端(webres)资源配置</div>
                    </div>
                    <el-button class="scwj color_b_3FC1C9 color_fff" size="mini" @click="handleUpdateRe">上传</el-button>
                    <el-button icon="el-icon-refresh" size="mini" @click="getResVeList()">刷新</el-button>
                  </div>

                  <el-table :data="tableDataResVe" style="width: 100%" v-loading="loading" ref="table">
                    <el-table-column header-align="center" align="center" prop="ulid" label="标识"></el-table-column>
                    <el-table-column header-align align="center" prop="title" label="资源名称"></el-table-column>
                    <el-table-column header-align align="center" prop="size" label="资源大小"></el-table-column>
                    <el-table-column header-align="center" align="center" prop="state" label="状态">
                      <template slot-scope="scope">
                        <div v-if="scope.row.state==0">禁用</div>
                        <div v-if="scope.row.state==1">解析中</div>
                        <div v-if="scope.row.state==2">解析成功</div>
                        <div v-if="scope.row.state==3">解析失败</div>
                      </template>
                    </el-table-column>

                    <el-table-column header-align="center" align="center" prop="update_type" label="更新类型">
                      <template slot-scope="scope">
                        <div v-if="scope.row.update_type==1">全量</div>
                        <div v-if="scope.row.update_type==2">增量</div>
                      </template>
                    </el-table-column>

                    <el-table-column header-align="center" align="center" prop="created_at" label="上传时间"></el-table-column>

                    <el-table-column header-align="center" align="center" label="操作" width="80">
                      <template slot-scope="scope">
                        <div class="row ">
                          <el-button style="background: #EF4F19;color: #fff;" size="small" @click="resVeDeleteFuc(scope.row)">删除</el-button>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-tab-pane>

              </el-tabs>



              <div class="center ">
                <pagination v-show="total > 0" :total="total" :page.sync="queryParams.noPage" :limit.sync="queryParams.pageSize" @pagination="getList" />
              </div>
            </div>
          </el-col>
        </el-row>
      </el-col>
    </el-row>



    <!--上传版本-正式服列表++++++++++++++++++++++++++++++++++++++++++++ -->
    <el-dialog center :title="title" :visible.sync="open_gxbb" width="36%" append-to-body>
      <!-- 表单++++++++++++++++++++++++++ -->
      <el-form ref="form_zfs" :model="form_zfs" :rules="rules" label-width="100px" label-position="top">

        <div class="row_a_c">
          <el-form-item label="文件加密密钥" prop="secret"><el-input style="width: 300px;" v-model="secret" disabled />
          </el-form-item>
          <el-button type="primary" @click="copyToClipboard" :disabled="loading" style="width: 100px;margin-top: 22px;margin-left: 20px;">复制</el-button>
          <el-tooltip class="item" effect="dark" content="重置后密钥将实时更新，之前的已上传文件将受影响，且平台不存储原来的密钥，请谨慎操作" placement="top">
            <el-button @click="modifySecretFuc" type="danger" v-if="open_gxbb_title" :disabled="loading" style="width: 100px;margin-top: 22px;">重置</el-button>
          </el-tooltip>
        </div>

        <el-form-item label="版本名" prop="title"><el-input v-model="form_zfs.title" :disabled="open_gxbb_title" /></el-form-item>
        <div style="margin-bottom: 10px;" class="color_3FC1C9 "><i class="el-icon-warning-outline mr_5"></i>填写后不能修改。</div>

        <el-form-item :label="zsbwza" prop="versionFile">
          <!-- <el-upload :data="additionalParams" :on-success="handleAvatarSuccessEdition" :headers="headersFile" class="upload-demo row_a_c" :action="upload_url_zoo" :on-remove="handleRemove" accept=".zip" :before-upload="beforeUploadEdition" :on-change="handleChangeZsf" :file-list="fileList" :on-error="errorUpload"> -->
          <el-upload :data="additionalParams" :on-success="handleAvatarSuccessEdition" :headers="headersFile" class="upload-demo row_a_c" :action="upload_url_zoo" :on-remove="handleRemove" accept=".zip" :before-upload="beforeUploadEdition" :file-list="fileList" :on-error="errorUpload">

            <div class="row_a_c">
              <div v-if="this.title == '更新版本'" style=" color: red;margin-right: 30px;">
                上次更新时间:{{form_zfs.updated_at}}

                <el-tooltip class="item" effect="dark" :content="form_zfs.update_desc" placement="top">
                  <i class="el-icon-warning ml_20"></i>
                </el-tooltip>
              </div>
              <el-button type="primary" :disabled="loading" style="width: 100px;">{{zsbwz}}</el-button>
            </div>

          </el-upload>
        </el-form-item>



        <div style="margin-bottom: 20px;" class="color_3FC1C9 ">
          <div>
            文件名必须是MirServer.zip，下级目录必须上传Mir200，也可上传DBSever，请不要上传其他目录。示例如下：
          </div>
          <img style="width:304px;height: 97px;margin-top: 10px;" src="../../assets/images/text.png" />
          <div class="mt10">
            只针对未开区服（如需更新已开区服版本，请到开关服版本更新）
          </div>



        </div>

        <el-form-item :label="zsbwzb" prop="logo">
          <!-- <el-upload :action="upload_url" :headers="headers" :before-upload="handleSetHeaders" :on-success="handleLogSuccessZsf" :show-file-list="false" class="avatar-uploader" accept="image/jpeg,image/png"> -->
          <el-upload :action="upload_url" :headers="headers" :before-upload="handleSetHeaders" :on-change="handleChangeLogo" :on-success="handleLogSuccessZsf" class="avatar-uploader" :file-list="fileListLogo" accept="image/jpeg,image/png">
            <img v-if="form_zfs.logo" :src="form_zfs.logo" class="avatar" />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
          <div style="margin-top: 10px;" class="color_3FC1C9 "><i class="el-icon-warning-outline mr_5"></i>图片格式png,图片尺寸建议280*192,大小不超过1MB 双击图片修改</div>
        </el-form-item>

        <el-form-item label="更新说明" prop="updateDesc"><el-input v-model="form_zfs.updateDesc" type="textarea" :rows="4" placeholder="请填写更新说明" /></el-form-item>

        <el-form-item :label="zsbwzc" prop="remark"><el-input :rows="4" v-model="form_zfs.remark" type="textarea" placeholder="备注信息"></el-input></el-form-item>
      </el-form>
      <!-- 表单====================================================== -->

      <div slot="footer" class="dialog-footer center">
        <div class="quxiao">
          <el-button style="width: 200px;height: 40px;margin-right: 30px;" @click="open_gxbb=false">取消</el-button>
        </div>

        <el-button style="width: 200px;height: 40px;" type="primary" @click="submitFormZsf" :disabled="loading">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 上传版本-正式服列表================================================== -->




    <!-- 选择应用资源++++++++++++++++++++++++++++++++++++++++ -->
    <el-dialog title="更新资源" center :visible.sync="openGxzy" width="70%" append-to-body>
      <el-tabs v-model="activeName_b" @tab-click="handleClickB">
        <el-tab-pane label="首包" name="second_b">
          <el-table :data="tableDataResVe" style="width: 100%" v-loading="loading" ref="table">
            <el-table-column header-align="center" align="center" prop="ulid" label="标识"></el-table-column>
            <el-table-column header-align align="center" prop="title" label="资源名称"></el-table-column>
            <el-table-column header-align align="center" prop="size" label="资源大小"></el-table-column>

            <el-table-column header-align="center" align="center" prop="state" label="状态">
              <template slot-scope="scope">
                <div v-if="scope.row.state==0">禁用</div>
                <div v-if="scope.row.state==1">解析中</div>
                <div v-if="scope.row.state==2">解析成功</div>
                <div v-if="scope.row.state==3">解析失败</div>
              </template>
            </el-table-column>

            <el-table-column header-align="center" align="center" prop="update_type" label="更新类型">
              <template slot-scope="scope">
                <div v-if="scope.row.update_type==1">全量</div>
                <div v-if="scope.row.update_type==2">增量</div>
              </template>
            </el-table-column>

            <el-table-column header-align="center" align="center" prop="is_use" label="是否使用">
              <template slot-scope="scope">
                <el-tag v-if="scope.row.is_use" type="success" effect="dark">使用中</el-tag>
                <el-tag v-else type="danger" effect="dark">未使用</el-tag>
              </template>
            </el-table-column>



            <el-table-column header-align="center" align="center" prop="created_at" label="上传时间"></el-table-column>

            <el-table-column header-align="center" align="center" label="操作" width="80">
              <template slot-scope="scope">
                <div class="row" v-if="scope.row.state==2">
                  <el-button style="background: #306EF2;color: #fff;" size="small" @click="resVeUseFuc(scope.row)">应用</el-button>
                </div>
              </template>
            </el-table-column>

          </el-table>
        </el-tab-pane>



        <el-tab-pane label="微端" name="third_b">



          <el-table :data="tableDataResVe" style="width: 100%" v-loading="loading" ref="table">
            <el-table-column header-align="center" align="center" prop="ulid" label="标识"></el-table-column>
            <el-table-column header-align align="center" prop="title" label="资源名称"></el-table-column>
            <el-table-column header-align align="center" prop="size" label="资源大小"></el-table-column>

            <el-table-column header-align="center" align="center" prop="state" label="状态">
              <template slot-scope="scope">
                <div v-if="scope.row.state==0">禁用</div>
                <div v-if="scope.row.state==1">解析中</div>
                <div v-if="scope.row.state==2">解析成功</div>
                <div v-if="scope.row.state==3">解析失败</div>
              </template>
            </el-table-column>

            <el-table-column header-align="center" align="center" prop="update_type" label="更新类型">
              <template slot-scope="scope">
                <div v-if="scope.row.update_type==1">全量</div>
                <div v-if="scope.row.update_type==2">增量</div>
              </template>
            </el-table-column>

            <el-table-column header-align="center" align="center" prop="is_use" label="是否使用">
              <template slot-scope="scope">
                <el-tag v-if="scope.row.is_use" type="success" effect="dark">使用中</el-tag>
                <el-tag v-else type="danger" effect="dark">未使用</el-tag>
              </template>
            </el-table-column>

            <el-table-column header-align="center" align="center" prop="created_at" label="上传时间"></el-table-column>

            <el-table-column header-align="center" align="center" label="操作" width="80">
              <template slot-scope="scope">
                <div class="row " v-if="scope.row.state==2">
                  <el-button style="background: #306EF2;color: #fff;" size="small" @click="resVeUseFuc(scope.row)">应用</el-button>
                </div>
              </template>
            </el-table-column>

          </el-table>

        </el-tab-pane>
      </el-tabs>


    </el-dialog>
    <!-- 选择应用资源======================================== -->





    <!-- 更新资源-正式服列表++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
    <el-dialog :title="title" center :visible.sync="openRe" width="46%" append-to-body>


      <!-- 包+++++++++++++++++++++++++++++++++++++++ -->
      <div v-if="baoshow==1" class="mmm">

        <div class="row_a_c mb20">
          <div class="zymc f_16">资源名称</div>
          <el-input v-model="zyfrom.title" :disabled="open_gxbb_title" />
        </div>

        <div class="row">
          <div class="f_16 mt5 mr_10 nowrap">更新类型</div>
          <div class="mt_10">
            <el-radio v-model="zyfrom.updateType" label="1">全量</el-radio>
            <el-radio v-model="zyfrom.updateType" label="2">增量</el-radio>
          </div>
        </div>
        <div class="f_14 mt10 f_bold" style="color: #DF1818;"> 全量：为覆盖更新 即客户端资源为最新上传的资源包；请使用配套工具生成，否则资源无法读取 </div>

        <div class="row_a_c mt_20">
          <div class="f_16 mt5 mr_10 nowrap">上传资源</div>

          <el-upload :data="suobaoData" class="upload-demo row_a_c" drag :file-list="fileListSb" :action="bao_url" :on-remove="handleRemoveSb" :before-upload="beforeUploadResSb" :on-success="handleAvatarSuccessSb" :on-error="handleAvatarErrorSb">
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
          </el-upload>

        </div>

        <div style="margin-left: 80px;">
          <div class="f_14 mt20 f_bold" style="color: #DF1818;">只允许上传zip格式，文件大小不能超过5G</div>
          <div v-if="this.activeName=='second'" class="f_14 f_bold mt5" style="color: #DF1818;">首包资源格式：packageres.zip </div>
        </div>


        <div slot="footer" class="dialog-footer center mt20">
          <el-button class="color_b_3FC1C9 color_fff" style="width: 200px;height: 40px;" @click="submitFormZygx" :disabled="loading">确定</el-button>
        </div>
      </div>
      <!-- 包============================================================================ -->
      <!-- 包记录++++++++++++++++++++++++++++++++++++++++++ -->
      <div v-if="baoshow==2 && tableDataResVe">

        <el-table :data="tableDataResVe" style="width: 100%">
          <el-table-column type="index" width="50"></el-table-column>
          <!-- <el-table-column prop="title" label="文件名"></el-table-column> -->
          <el-table-column prop="size" label="文件大小"></el-table-column>

          <el-table-column prop="type" label="更新类型">
            <template slot-scope="scope">
              <div v-if="scope.row.type==1">首包</div>
              <div v-if="scope.row.type==2">微端</div>
            </template>
          </el-table-column>

          <el-table-column prop="state" label="更新状态">
            <template slot-scope="scope">
              <div v-if="scope.row.state==0">未上传</div>
              <div v-if="scope.row.state==1">上传成功</div>
              <div v-if="scope.row.state==2">上传失败</div>
            </template>
          </el-table-column>

          <el-table-column prop="created_at" label="更新时间"></el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer center mt20">
          <el-button class="color_b_3FC1C9 color_fff" style="width: 200px;height: 40px;" @click="baoshow=1">返回</el-button>
        </div>
      </div>
      <!-- 包记录=================================== -->

    </el-dialog>
    <!-- 更新资源-正式服列表===================================================================== -->







    <!-- 申请联运-正式服列表++++++++++++++++++++ -->
    <el-dialog center title="请填写此版本运营" :visible.sync="openNy" width="500px" style="margin-top: 200px;" append-to-body>
      <el-form ref="form" :model="formNy" label-width="100px" label-position="top">
        <el-form-item label=""><el-input v-model="formNy.operate_id" placeholder="请输入运营ID" /></el-form-item>
      </el-form>

      <div slot="footer" class="dialog-footer row">
        <div class="quxiao"><el-button style="width: 200px;height: 40px;margin-right: 30px;" @click="cancel">取
            消</el-button></div>
        <el-button style="width: 200px;height: 40px;" type="primary" @click="nyUpdate">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 申请联运-正式服列表=================== -->



    <!-- 申请渠道++++++++++++++++++++ -->
    <el-dialog center title="申请渠道" :visible.sync="openChannel" width="600px" style="margin-top: 200px;" append-to-body>

      <el-form ref="form" :model="formChannel" label-width="60px">
        <el-form-item label="游戏id">
          <el-input v-model="formChannel.ulid" disabled />
        </el-form-item>

        <el-form-item label="游戏名">
          <el-input v-model="formChannel.title" disabled />
        </el-form-item>


      </el-form>

      <div slot="footer" class="dialog-footer center">
        <div class="quxiao"><el-button style="width: 200px;height: 40px;margin-right: 30px;" @click="openChannel=false">取
            消</el-button></div>
        <el-button style="width: 200px;height: 40px;" type="primary" @click="channelUpdate">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 申请渠道=================== -->


    <!-- 申请评测++++++++++++++++++++ -->
    <el-dialog center title="申请评测" :visible.sync="openEva" width="1100px" style="margin-top: 50px;" append-to-body>

      <el-form ref="formEvaRef" :model="formEva" label-width="135px" :rules="rulesGame">
        <el-form-item label="游戏id" prop="game_id">
          <el-input v-model="formEva.game_id" disabled />
        </el-form-item>



        <el-form-item label="游戏名" prop="title">
          <el-input v-model="formEva.title" disabled />
        </el-form-item>

        <el-form-item label="版本类型" prop="type">
          <el-select v-model="formEva.type" placeholder="请选择版本类型" @change="gameTypeChange" :disabled="qkdis">
            <el-option v-for="item in game_type" :key="item.ulid+'a'" :label="item.title" :value="item.ulid">
            </el-option>
          </el-select>
        </el-form-item>


        <el-form-item label="版本分类" prop="class">
          <el-select v-model="formEva.class" placeholder="请选择版本分类" :disabled="qkdis">
            <el-option v-for="item in game_class" :key="item.ulid+'b'" :label="item.title" :value="item.ulid">
            </el-option>
          </el-select>
        </el-form-item>


        <el-form-item label="平台" prop="system">
          <el-select v-model="formEva.system" placeholder="请选择平台" multiple style="width: 100%;" :disabled="qkdis">
            <el-option v-for="item in platform" :key="item.ulid+'c'" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>


        <el-form-item label="结算周期" prop="system">
          <el-select v-model="formEva.settlement_interval" placeholder="请选结算周期" style="width: 100%;" :disabled="qkdis">
            <el-option v-for="item in settlementIntervalList" :key="item.value+'f'" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>




        <el-form-item label="结算比例">
          <el-input v-model="settlement_ratio" placeholder="1-100(1%-100%)" disabled />
        </el-form-item>



        <el-form-item label="充值比例" prop="ratio">
          <el-input v-model="formEva.ratio" placeholder="1-100(1%-100%)" :disabled="qkdis" />
        </el-form-item>

        <el-form-item label="版本说明" prop="content">
          <div style="color: red;">(包括不限于玩法说明、消费层次、套装数量、越详尽越好)</div>
          <editor v-if="!qkdis" v-model="formEva.content" :minHeight="300" :disabled="qkdis" />
          <div v-else v-html="formEva.content"></div>
        </el-form-item>





        <el-form-item label="游戏截图(可多张)" prop="gameimg">
          <el-upload :action="upload_url" list-type="picture-card" :on-success="handleChangeGame" :file-list="evaFiles" :on-remove="handleRemoveGame" :show-file-list="true" :disabled="qkdis">
            <i class="el-icon-plus"></i>
          </el-upload>
        </el-form-item>

        <el-form-item label="测试APK下载地址" prop="apkadd">
          <el-input v-model="formEva.apkadd" :disabled="qkdis" />
        </el-form-item>


        <el-form-item label="测试PC下载地址" prop="pcadd">
          <el-input v-model="formEva.pcadd" :disabled="qkdis" />
        </el-form-item>

        <el-form-item label="审核失败原因" v-if="formEva.channel_state==3">
          <div v-for="(item, index) in reasons" :key="index+'c'">{{item}}</div>
        </el-form-item>

        <el-form-item v-if="formEva.channel_state" label="评测报告" prop="annex">
          <a :href="formEva.annex">点击下载</a>
        </el-form-item>

      </el-form>


      <div slot="footer" class="dialog-footer center" v-if="formEva.channel_state==null || formEva.channel_state==3">
        <div class="quxiao"><el-button style="width: 200px;height: 40px;margin-right: 30px;" @click="openEva=false">取
            消</el-button></div>
        <el-button style="width: 200px;height: 40px;" type="primary" @click="channelUpdateEva">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 申请评测=================== -->


    <!-- 申请入库-正式服列表+++++++++++++++++++++++++++++++ -->
    <el-dialog center title="请填写版本入库信息" :visible.sync="open" width="30%" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="100px" label-position="top">
        <el-form-item label="已选择游戏名称"><el-input disabled v-model="form.file_name" placeholder="" /></el-form-item>
        <el-form-item label="版本id"><el-input disabled v-model="form.file_name" placeholder="" /></el-form-item>

        <el-form-item label="结算规则">

          <div class="row_a_c ">
            <el-radio v-model="gsgz" label="1">周结</el-radio>
            <el-radio v-model="gsgz" label="2">月结</el-radio>
            <div class="row_a_c ggzz">
              <div class="mr_20">分润比例</div>
              <el-input style="width: 120px;" class="mr_20" v-model="ratio" placeholder="请输入比例" type="number"></el-input>
              <div>%</div>
            </div>
          </div>


        </el-form-item>

        <el-form-item label="试玩包" prop="logo">
          <el-select v-model="value" placeholder="请选择">
            <el-option v-for="item in tableDataPc" :key="item.value+'d'" :label="item.title+'—ANDROID—'+item.lander_version.title+'—'+item.created_at" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="版本类型" prop="logo">
          <el-select v-model="value" placeholder="请选择">
            <el-option v-for="item in options" :key="item.value+'e'" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="游戏图片(可多张)" prop="logo">

          <el-upload :action="upload_url" list-type="picture-card" :on-success="handleChangePho" :file-list="editFiles" :on-remove="handleRemovePho" :show-file-list="true">
            <i class="el-icon-plus"></i>
          </el-upload>

        </el-form-item>

        <el-form-item label="游戏介绍" prop="remark">
          <el-input :rows="4" v-model="form.remark" type="textarea" placeholder="请输入游戏介绍(上限150字)"></el-input>
        </el-form-item>



      </el-form>
      <div slot="footer" class="dialog-footer center">
        <el-button class="color_b_3FC1C9 color_fff" style="width: 200px;height: 40px;" @click="submitForm">确
          定</el-button>
      </div>
    </el-dialog>
    <!-- 申请入库-正式服列表+++++++++++++++++++++++++++++++ -->


    <!--    <el-dialog title="提示" :visible.sync="config_value" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
      <span style="font-size: 30px;">版本列表，维护中</span>
    </el-dialog> -->


  </div>
</template>

<script>
  import CountTo from 'vue-count-to';
  import Cookies from 'js-cookie';
  import Vue from 'vue';

  import Navvz from '@/components/Navvz';
  import Sidebartss from '@/components/Sidebartss';
  import * as Database from '@/api/system/database';
  import * as Auth from '@/utils/auth';
  import * as RequestFile from '@/utils/requestFile';
  import * as Games from '@/api/system/games';
  import * as Version from '@/api/system/version';
  import * as Work from "@/api/operation/work";
  import * as Evaluating from "@/api/system/evaluating";
  import * as Config from "@/api/system/config";
  import SparkMD5 from "spark-md5";
  import Axios from "axios";
  import * as Upfile from '@/api/system/upfile';
  import * as User from '@/api/system/user';
  import Sortable from 'sortablejs';
  import axios from 'axios';

  import {
    Notification,
    MessageBox,
    Message,
    Loading
  } from 'element-ui';
  export default {
    name: 'Index',
    components: {
      CountTo,
      Navvz,
      Sidebartss,
    },
    data() {
      return {
        xzyyData: [], //选中应用数据
        additionalParams: {
          channel: 'developer-platform',
          scene: 'game-version',
        },
        //首包资源文件
        suobaoData: {
          name: '',
          key: '',
          policy: '',
          OSSAccessKeyId: '',
          success_action_status: 200,
          callback: '',
          Signature: '',
        },

        //微端资源文件
        weiDuanData: {
          name: '',
          key: '',
          policy: '',
          OSSAccessKeyId: '',
          success_action_status: 200,
          callback: '',
          Signature: '',
        },
        headersFile: {
          timestamp: '',
          sign: '',
          AppKey: '',
          AppSign: '',
        },
        secret: null,
        lastTime: null,


        sortedItems: null,
        cjkfz: null,
        config_value: 1,
        config_remark: null,
        qkdis: false,
        settlement_ratio: null, //结算比例
        reasons: null, //评测失败原因
        game_type: [], //版本类型(游戏类型)
        game_class: [], //版本分类
        platform: [], //平台
        uploadProgress: 0,
        //首包 表单
        zyfrom: {
          title: null,
          updateType: '1', //1全量  2增量  更新类型
          type: 1, //资源类型 1首包 2微端
          resourceFile: null,
          size: null,
        },

        zyfromWd: {
          title: null,
          updateType: '1', //1全量  2增量  更新类型
          type: 2, //资源类型 1首包 2微端
          resourceFile: null,
          size: null,
        },

        //上传版本表单
        form_zfs: {},
        ratio: null, //冲值比例
        zsbwz: '点击上传',
        zsbwza: '版本上传入口',
        zsbwzb: 'logo上传',
        zsbwzc: '备注',
        tableDataPc: [], //pc登录器列表
        tableDataResVe: [], //资源版本列表
        capacity: {}, //更新资源判断上传文件大小
        surplus_capacity: '',
        gsgz: '1',
        userId: '',
        baoshow: 1,
        baobao: '1',
        ershow: 'first',
        itemqh: 1,
        activeName: 'first',
        activeName_b: 'second_b',
        user_id: '',
        game_name: '',
        id: '', //更新id

        fileListLogo: [],

        fileList: [],
        fileListMb: [],
        fileListSb: [],
        fileListWd: [],

        editFiles: [],
        evaFiles: [], //申请评测
        // upload_url_zoo: 'https://pub.api.023box.com/api/v1/upload/file',
        upload_url_zoo: 'https://api.pub.95hy.coms/api/v1/upload/file',
        // upload_url_zoo: process.env.VUE_APP_SUM_PUB + '/upload/file',
        upload_url: process.env.VUE_APP_BASE_URL + '/file/upload',
        upload_url_all: process.env.VUE_APP_BASE_URL + '/file/uploadAll',
        bao_url: 'https://gameres.35z.cn/',
        headers: Auth.getHeader(),
        logo: '',
        // 总条数
        total: 0,
        // 字典表格数据
        tableData: [],
        tableData_two: [],
        // 弹出层标题
        title: '',
        // 是否显示弹出层
        open_zsf: false,
        open: false,
        openNy: false,
        openChannel: false, //渠道
        openEva: false, //评测
        open_gxbb: false,
        open_gxbb_title: false,
        open_xf: false,
        openRe: false,
        openGxzy: false,

        // 查询参数
        queryParams: {
          noPage: 1,
          pageSize: 10
        },

        queryParamsPc: {
          noPage: 1,
          pageSize: 10,
        },

        queryParamsRec: {
          noPage: 1,
          pageSize: 10,
        },


        // 表单参数

        form: {
          photo: '' // 活动图片
        },

        formNy: {},
        formChannel: {}, //渠道表单
        formEva: {
          // settlement_interval:'2'
        }, //评测表单

        settlementIntervalList: [{
            label: '周',
            value: 1,
          },
          {
            label: '月',
            value: 2,
          }, {
            label: '季度',
            value: 3,
          }, {
            label: '年',
            value: 4,
          }
        ],
        // 表单校验
        rulesGame: {

          game_id: [{
            required: true,
            message: '游戏id不能为空',
            trigger: 'blur'
          }],
          title: [{
            required: true,
            message: '游戏名不能为空',
            trigger: 'blur'
          }],
          type: [{
            required: true,
            message: '版本类型不能为空',
            trigger: 'blur'
          }],
          class: [{
            required: true,
            message: '版本分类不能为空',
            trigger: 'blur'
          }],
          content: [{
            required: true,
            message: '版本说明不能为空',
            trigger: 'blur'
          }],
          ratio: [{
            required: true,
            message: '充值比例不能为空',
            trigger: 'blur'
          }],
          gameimg: [{
            required: true,
            message: '游戏截图不能为空',
            trigger: 'blur'
          }],
          apkadd: [{
            required: true,
            message: '测试APK下载地址不能为空',
            trigger: 'blur'
          }],
          pcadd: [{
            required: true,
            message: '测试PC下载地址不能为空',
            trigger: 'blur'
          }],


        },

        // 表单校验
        rules: {
          title: [{
            required: true,
            message: '版本名不能为空',
            trigger: 'change'
          }],
          // versionFile: [{
          //   required: true,
          //   message: '版本更新文件不能为空',
          //   trigger: 'blur'
          // }],
          logo: [{
            required: true,
            message: 'logo不能为空',
            trigger: 'blur'
          }],

          updateDesc: [{
            required: true,
            message: '更新说明不能为空',
            trigger: 'blur'
          }],




        },
        loading: false,
        options: [{
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }],
        value: ''

      };
    },
    created() {
      this.userId = localStorage.getItem('user_id');
      this.getList();
      this.getConfigInof();
    },
    mounted() {
      this.initSortable();
    },
    methods: {

      generateVersionSecret() {
        const length = 16;
        const BASE_NUMBER = '0123456789';
        const BASE_CHAR = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        const baseString = BASE_CHAR + BASE_NUMBER;
        let character = '';
        const baseLength = baseString.length;
        for (let i = 0; i < length; i++) {
          const number = Math.floor(Math.random() * (baseLength));
          character += baseString.charAt(number);
        }
        this.secret = character;
      },

      async copyToClipboard() {
        try {
          this.loading = true;
          await navigator.clipboard.writeText(this.secret);
          this.$message.success('复制成功!');
        } catch (err) {
          console.error('复制失败:', err);
          this.$message.error('复制失败!');
        } finally {
          this.loading = false;
        }
      },





      //资源应用
      resVeUseFuc(row) {
        this.$confirm('此操作实时生效，确定要应用于当前游戏吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var peres = {};
          peres.resource = row.ulid;
          peres.user = this.userId;
          peres.type = row.type;
          peres.updateType = row.update_type;
          peres.game = this.xzyyData.ulid;
          peres.type_pj = 1;
          Version.ResVeUse(peres).then(response => {
            if (response.code === 200) {
              this.getResVeList();
              // this.$message.success(' 成功！');
              this.$message.success({
                message: '成功！',
                duration: 5 * 1000 // 设置为5秒
              });
            } else {
              this.$message.error(' 失败！');
            }
          }).catch(err => {
            console.error(err);
            this.$message.error(' 请求出错，请稍后重试！');
          });
        }).catch(() => {
          this.$message.info(' 已取消操作');
        });
      },




      //资源删除
      resVeDeleteFuc(row) {
        this.$confirm('此操作不可逆，删除后将无法找回资源文件以及其关联的增量更新资源，确定删除吗？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          var peres = {};
          peres.resource = row.ulid;
          peres.user = this.userId;
          peres.type = row.type;
          peres.type_pj = 1;
          Version.ResVeDelete(peres).then(response => {
            if (response.code === 200) {
              this.getResVeList();
              this.$message.success(' 成功！');
            } else {
              this.$message.error(' 失败！');
            }
          }).catch(err => {
            console.error(err);
            this.$message.error(' 请求出错，请稍后重试！');
          });
        }).catch(() => {
          this.$message.info(' 已取消操作');
        });
      },


      //重置密钥
      modifySecretFuc(row) {
        // 弹出确认对话框
        this.$confirm('重置后新密钥将实时生效，之前的已上传文件将受影响，且平台不存储原来的密钥，请谨慎操作？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          // 用户点击确定后执行以下逻辑
          this.secret = row.secret;
          this.form_zfs = row;
          var peres = {};
          peres.user = this.userId;
          peres.secret = this.secret;
          peres.ulid = this.form_zfs.ulid;
          peres.type_pj = 1;
          // 调用 API 进行密钥重置
          Version.modifySecret(peres).then(response => {
            if (response.code === 200) {
              this.$message.success(' 成功！');
            } else {
              this.$message.error(' 失败！');
            }
          }).catch(err => {
            // 处理 API 请求出错的情况
            console.error(err);
            this.$message.error(' 请求出错，请稍后重试！');
          });
        }).catch(() => {
          // 用户点击取消后执行的逻辑
          this.$message.info(' 已取消操作');
        });
      },

      // modifySecretFuc() {
      //   var peres = {};
      //   peres.user = this.userId
      //   peres.secret = this.secret
      //   peres.ulid = this.form_zfs.ulid
      //   peres.type_pj = 1
      //   Version.modifySecret(peres).then(response => {
      //     if (response.code == 200) {
      //       this.$message.success('成功!');
      //     } else {
      //       this.$message.error('失败!');
      //     }
      //   });
      // },


      initSortable() {
        new Sortable(this.$refs.table.$el.querySelector('tbody'), {
          animation: 150,
          onEnd: this.onEnd,
        });
      },
      onEnd(evt) {

        console.log('oldIndex', evt.oldIndex)
        console.log('newIndex', evt.newIndex)
        var newIndex = evt.newIndex;
        var oldIndex = evt.oldIndex;

        var sortedItems = this.tableData_two.slice(); // 创建一个副本

        const draggingRow = sortedItems[oldIndex]; // 获取要移动的元素
        console.log('draggingRow', draggingRow)
        sortedItems.splice(oldIndex, 1); // 从旧位置删除元素
        sortedItems.splice(newIndex, 0, draggingRow); // 在新位置插入元素
        this.tableData_two = sortedItems;

        var per = {};
        per.type_pj = 1;
        per.tableData_two = this.tableData_two;
        Version.VersionSort(per).then(response => {});
      },


      /** 查询列表 */
      getList() {
        this.queryParams.user = this.userId
        this.queryParams.type_pj = 1
        this.queryParams.type = 1
        this.loading = true;
        Version.getList(this.queryParams).then(response => {
          var arc = response.data.list;
          this.tableData = response.data.list;
          this.tableData_two = arc;
          this.total = response.data.pagination.totalCount;
          this.loading = false;
          this.$forceUpdate();
        });
      },


      //取消上传版本---文件--按钮
      handleRemove(file, fileList) {
        this.$set(this.form_zfs, 'versionFile', '');
      },





      //取消首包上传---文件--按钮
      handleRemoveSb(file, fileList) {
        this.$set(this.zyfrom, 'resourceFile', '');
        this.$set(this.zyfrom, 'size', '');
      },


      //取消微端上传---文件--按钮
      handleRemoveWd(file, fileList) {
        this.$set(this.zyfromWd, 'resourceFile', '');
        this.$set(this.zyfromWd, 'size', '');
      },










      //版本上传成功
      handleAvatarSuccessEdition(res, file, fileList) {
        console.log('文件大小', file.size);
        if (res.code == 200) {
          this.form_zfs.versionFile = res.data.path;
          this.form_zfs.versionSize = res.data.size;
          console.log('abc', this.form_zfs);
          this.$modal.msgSuccess('上传成功');
        } else {
          const index = fileList.findIndex(item => item.uid === file.uid);
          if (index !== -1) {
            fileList.splice(index, 1);
          }
          this.$message.error('上传文件失败');
        }
      },




      //版本上传前拼接参数---上传文件判断
      beforeUploadEdition(file) {

        if (file.name.toLowerCase() !== "mirserver.zip") {
          this.$message.error("上传文件名须为 MirServer");
          return false;
        }
        const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
        const whiteList = ["zip"];
        if (whiteList.indexOf(fileSuffix) === -1) {
          this.$message.error('上传文件只能是 zip格式');
          return false;
        }
        const isLt5M = file.size / 1024 / 1024 / 1024 < 5;
        if (!isLt5M) {
          this.$message.error('上传文件大小不能超过 5MB');
          return false;
        }


        // 使用拼接方法
        let signParams = RequestFile.splicingParameter(this.additionalParams);
        // 设置请求头
        this.headersFile.timestamp = signParams.timestamp;
        this.headersFile.sign = signParams.Sign;
        this.headersFile.AppKey = signParams.AppKey;
        this.headersFile.AppSign = signParams.AppSign;
        return true; // 返回 true 继续执行上传
      },














      //获取配置详情---超级开发者
      getConfigInofCj() {
        this.loading = true;
        var peres = {};
        peres.id = 53;
        Config.info(peres).then((response) => {
          this.cjkfz = response.data.config_value;
          this.getConfigInof();
          this.loading = false;
        });
      },

      //获取配置详情
      getConfigInof() {
        this.loading = true;
        var peres = {};
        peres.id = 52;
        Config.info(peres).then((response) => {
          if (response.data.config_value == 1 && this.userId != 10001) {
            this.config_remark = response.data.remark
            this.config_value = response.data.config_value
            this.handleClose();
          } else {
            this.nickname = localStorage.getItem('username')
            this.userId = localStorage.getItem('user_id')
            this.settlement_ratio = localStorage.getItem('settlement_ratio')
            this.getPcList(); //查询pc登录器列表
            this.getGametype(); //版本类型(申请评测)
            this.getPlatform();

          }
          this.loading = false;
        });
      },

      handleClose() {
        MessageBox.confirm(this.config_remark, '系统提示', {
          showCancelButton: false,
          type: 'warning'
        }).then(() => {
          this.$emit('value-updated', '/center/dataAnalysis');
          this.$router.push({
            path: '/center/dataAnalysis'
          });
        }).catch(() => {
          this.$emit('value-updated', '/center/dataAnalysis');
          this.$router.push({
            path: '/center/dataAnalysis'
          });
        });
      },


      errorUpload(err) {
        this.$message.error('上传文件过大或格式不正确');
      },

      handleUploadProgress(event, file, fileList) {
        var paa = parseInt(event.percent)
        if (paa < 80) {
          this.uploadProgress = paa;
        } else {
          this.uploadProgress = 80;
        }


      },




      //首包---资源更新---上传成功
      handleAvatarSuccessSb(response, file, fileList) {
        console.log('response文件大小', response);
        console.log('file文件大小', file);
        if (response.code == 200) {

          let path = response.data.host + '/' + response.data.filename;
          this.zyfrom.resourceFile = path;
          this.zyfrom.size = response.data.size;

          console.log('哈哈哈', this.zyfrom);


          this.$modal.msgSuccess('上传成功');
        } else {
          const index = fileList.findIndex(item => item.uid === file.uid);
          if (index !== -1) {
            fileList.splice(index, 1);
          }
          this.$message.error('上传文件失败');
        }
      },



      //微端---资源更新---上传成功
      handleAvatarSuccessWd(response, file, fileList) {
        console.log('response文件大小', response);
        console.log('file文件大小', file);
        if (response.code == 200) {

          let path = response.data.host + '/' + response.data.filename;
          this.zyfromWd.resourceFile = path;
          this.zyfromWd.size = response.data.size;

          console.log('哈哈哈', this.zyfromWd);


          this.$modal.msgSuccess('上传成功');
        } else {
          const index = fileList.findIndex(item => item.uid === file.uid);
          if (index !== -1) {
            fileList.splice(index, 1);
          }
          this.$message.error('上传文件失败');
        }
      },







      //首包---资源更新---上传失败
      handleAvatarErrorSb() {
        this.$message.error("上传失败");
        return false;
      },

      //微端---资源更新---上传失败
      handleAvatarErrorWd() {
        this.$message.error("上传失败");
        return false;
      },











      //首包资源文件上传前
      beforeUploadResSb(file) {


        const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);

        const whiteList = ["rar", "zip"];

        if (whiteList.indexOf(fileSuffix) === -1) {
          this.$message.error('上传文件只能是rar、zip格式');
          return false;
        }

        console.log('size', file.size)

        const isLt2M = file.size / 1024 / 1024 / 1024 < 5;

        if (!isLt2M) {
          this.$message.error('上传文件大小不能超过 5G');
          return false;
        }


        console.log('准备上传文件:', file);

        return new Promise((resolve, reject) => {
          const params = {
            game: this.zyfrom.version,
            type_pj: 1,
          };

          console.log('请求签名参数:', params);

          Games.GameResource(params)
            .then(response => {
              console.log('签名响应:', response);

              this.$set(this.suobaoData, 'name', response.data.filename);
              this.$set(this.suobaoData, 'key', response.data.dir + response.data.filename);
              this.$set(this.suobaoData, 'OSSAccessKeyId', response.data.accessid);
              this.$set(this.suobaoData, 'policy', response.data.policy);
              this.$set(this.suobaoData, 'callback', response.data.callback);
              this.$set(this.suobaoData, 'Signature', response.data.signature);

              console.log('最终 suobaoData:', this.suobaoData);

              resolve(true); // 允许上传
            })
            .catch(error => {
              console.error('签名请求失败:', error);
              this.$modal.msgError('获取上传签名失败');
              reject(false); // 阻止上传
            });
        });
      },


      //微端资源文件上传前
      beforeUploadResWd(file) {


        const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);

        const whiteList = ["rar", "zip"];

        if (whiteList.indexOf(fileSuffix) === -1) {
          this.$message.error('上传文件只能是rar、zip格式');
          return false;
        }

        console.log('size', file.size)

        const isLt2M = file.size / 1024 / 1024 / 1024 < 5;

        if (!isLt2M) {
          this.$message.error('上传文件大小不能超过 5G');
          return false;
        }


        console.log('准备上传文件:', file);

        return new Promise((resolve, reject) => {
          const params = {
            game: this.zyfromWd.version,
            type_pj: 1,
          };
          console.log('请求签名参数:', params);

          Games.GameResource(params)
            .then(response => {
              console.log('签名响应:', response);

              this.$set(this.weiDuanData, 'name', response.data.filename);
              this.$set(this.weiDuanData, 'key', response.data.dir + response.data.filename);
              this.$set(this.weiDuanData, 'OSSAccessKeyId', response.data.accessid);
              this.$set(this.weiDuanData, 'policy', response.data.policy);
              this.$set(this.weiDuanData, 'callback', response.data.callback);
              this.$set(this.weiDuanData, 'Signature', response.data.signature);

              console.log('最终 weiDuanData:', this.weiDuanData);

              resolve(true); // 允许上传
            })
            .catch(error => {
              console.error('签名请求失败:', error);
              this.$modal.msgError('获取上传签名失败');
              reject(false); // 阻止上传
            });
        });
      },



      /** 查询pc登录器列表*/
      getPcList() {
        this.queryParamsPc.type_pj = 1
        this.queryParamsPc.user = this.userId
        this.loading = true;
        Work.getPcList(this.queryParamsPc).then(response => {
          this.tableDataPc = response.data.list;
          console.log('tableDataPc', this.tableDataPc)
          this.loading = false;
        });
      },

      /** 查询资源版本列表*/
      getResVeList() {
        this.queryParamsRec.type_pj = 1
        this.queryParamsRec.user = this.userId
        //资源类型 1首包 2微端'
        this.queryParamsRec.type = 1
        if (this.activeName == 'second' || this.activeName_b == 'second_b') {
          this.queryParamsRec.type = 1
        }

        if (this.activeName == 'third' || this.activeName_b == 'third_b') {
          this.queryParamsRec.type = 2
        }


        this.loading = true;
        Version.getResVeList(this.queryParamsRec).then(response => {
          this.tableDataResVe = response.data.list;
          this.capacity = response.data.capacity; ////更新资源判断上传文件大小
          console.log('aaa1111', this.capacity.total.byte)
          console.log('bbb2222', this.capacity.used.byte)
          this.surplus_capacity = ((this.capacity.total.byte - this.capacity.used.byte) / 1024 / 1024 / 1024)
            .toFixed(2)
          console.log('tableDataResVe', this.tableDataResVe)
          this.loading = false;
        });
      },

      /** 资源上次更新时间*/
      LastUpdatedTime(version) {
        this.queryParamsRec.type_pj = 1
        this.queryParamsRec.user = this.userId
        this.queryParamsRec.version = version

        Version.LastUpdatedTime(this.queryParamsRec).then(response => {
          // this.tableDataResVe = response.data.list;
          this.lastTime = response.data.list;
          console.log('666', this.lastTime['miniport_bag']['updated_at'])
        });
      },

      handlePictureCardPreview(file) {
        console.log('file', file)
      },
      handleRemovePho(file, fileList) {
        this.fileChange(fileList);
        console.log('file', file);
        console.log('fileList', fileList);
      },

      handleClick(tab, event) {
        console.log(this.activeName);
        if (this.activeName == 'second' || this.activeName == 'third') {
          this.getResVeList();
        }

      },

      handleClickB(tab, event) {
        if (this.activeName_b == 'second_b' || this.activeName_b == 'third_b') {
          this.getResVeList();
        }
      },

      //相册上传成功调用
      handleChangePho(res, file, fileList) {
        this.fileChange(fileList);
      },

      //游戏截图上传成功调用
      handleChangeGame(res, file, fileList) {
        this.fileChangeGame(fileList);
      },

      handleRemoveGame(file, fileList) {
        this.fileChangeGame(fileList);
      },

      // 游戏截图
      fileChangeGame(fileList) {

        let temp_str = '';
        if (fileList.length > 0) {
          for (let i = 0; i < fileList.length; i++) {
            if (fileList[i].response) {
              if (fileList[i].response.status == 200) {
                if (i == 0) {
                  temp_str += fileList[i].response.data;
                } else {
                  // 最终photo的格式是所有已上传的图片的url拼接的字符串（逗号隔开）
                  temp_str += ',' + fileList[i].response.data;
                }
              }
            }
          }
        }

        this.$set(this.formEva, 'gameimg', temp_str)



        this.$refs.formEvaRef.validateField('gameimg', (errorMsg) => {
          if (errorMsg) {
            // 验证未通过，处理错误消息
            console.log(errorMsg);
          } else {
            // 验证通过，执行相应操作
          }
        });
        // this.formEva.gameimg = temp_str;
        console.log('formEva-fileChangeGame', this.formEva);
      },

      /** 重置按钮操作 */
      resetQuery() {
        this.fileList = [];
        this.$set(this.queryParams, 'name', undefined);
        this.resetForm('queryForm');
        this.handleQuery();
      },







      // 设置photo值
      fileChange(fileList) {

        let temp_str = '';
        if (fileList.length > 0) {
          for (let i = 0; i < fileList.length; i++) {
            if (fileList[i].response) {
              if (fileList[i].response.code === 200) {
                if (i === 0) {
                  temp_str += fileList[i].response.data;
                } else {
                  // 最终photo的格式是所有已上传的图片的url拼接的字符串（逗号隔开）
                  temp_str += ',' + fileList[i].response.data;
                }
              }
            }
          }
        }
        this.form.photo = temp_str;
      },








      handleSetHeaders(file) {
        const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
        const whiteList = ["png"];
        if (whiteList.indexOf(fileSuffix) === -1) {
          this.$message.error('上传文件只能是png格式');
          return false;
        }
        const maxSize = 1 * 1024 * 1024; // 最大文件大小 2MB
        const maxWidth = 280; // 最大图片宽度
        const maxHeight = 192; // 最大图片高度

        // 检查文件大小
        if (file.size > maxSize) {
          this.$message.error('文件大小不能超过 1MB');
          return false; // 阻止文件上传
        }

        const img = new Image();
        const reader = new FileReader();
        reader.onload = (e) => {
          img.src = e.target.result;
        };

        reader.readAsDataURL(file);

        img.onload = () => {
          console.log('图片宽度', img.width);
          console.log('图片高度', img.height);
          if (img.width > maxWidth || img.height > maxHeight) {
            this.$message.error(`图片尺寸不能超过 ${maxWidth}x${maxHeight}`);
            this.$set(this.form_zfs, 'logo', '');
            this.fileListLogo = [];
            return false;
          }
        };


        this.headers = Auth.getHeader();
        return true;
      },

      handleSetHeadersUp(file, row) {
        this.id = row.id;

        this.$set(this.formNy, 'operate_id', row.operate_id);
        this.$set(this.form, 'file_addr', row.file_addr);
        this.$set(this.form, 'file_name', row.file_name);
        this.$set(this.form, 'size', row.size);

        this.$set(this.form, 'logo', row.logo);
        this.$set(this.form, 'remark', row.remark);

        this.headers = Auth.getHeader();
      },


      /****正式服文件上传*****/
      handleFileSuccessZsf(res) {
        console.log('res111', res)
        this.$set(this.form_zfs, 'versionFile', res.data);
      },

      /****正式服Logo上传*****/
      handleLogSuccessZsf(res) {
        this.$set(this.form_zfs, 'logo', res.data);

      },


      /****文件上传*****/
      handleFileSuccess(res) {
        this.$set(this.form, 'logo', res.data);

      },



      handleChangeZsf(file, fileList) {

        if (file.response) {
          this.form_zfs.versionFile = file.response.data
        }
        this.fileList = fileList.slice(-1);

      },

      handleChangeLogo(file, fileList) {
        this.fileListLogo = fileList.slice(-1);
      },



      handleChange(file, fileList) {
        this.zyfrom.title = file.name
        this.zyfrom.size = file.size
        if (file.response) {
          this.zyfrom.resourceFile = file.response.data
        }
        this.fileList = fileList.slice(-1);

      },

      //首包
      handleChangeSb(file, fileList) {

        this.fileListSb = fileList.slice(-1);

      },





      /****文件上传-新增*****/
      handleFileSuccessAdd(res) {
        this.reset();
        var per = {
          file_name: res.data.file_name,
          size: res.data.size,
          file_addr: res.data.url,
          test_formal: 1,
          logo: res.data.logo,
          remark: res.data.remark
        };

        Games.Add(per).then(response => {
          this.$modal.msgSuccess('新增成功');
          this.reset();
          this.getList();
        });


      },


      /****文件上传-修改*****/
      handleFileSuccessUpdate(res) {
        var per = {
          id: this.id,
          file_name: res.data.file_name,
          size: res.data.size,
          file_addr: res.data.url,
          operate_id: this.formNy.operate_id,
          test_formal: 1,
          logo: this.form.logo,
          remark: this.form.remark
        };
        Games.Update(per).then(response => {
          this.$modal.msgSuccess('更新成功');
          this.reset();
          this.getList();
        });
      },

      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.page = 1;
        this.getList();
      },





      /**首包---更新资源提交按钮 */
      submitFormZygx: function() {
        this.zyfrom.user = this.userId
        this.zyfrom.game = this.userId
        this.zyfrom.type_pj = 1
        this.loading = true;

        if (this.activeName == 'second') {
          this.zyfrom.type = 'first'
        }
        if (this.activeName == 'third') {
          this.zyfrom.type = 'miniport'
        }

        console.log('aaabbbccc', this.zyfrom)
        Version.AddRes(this.zyfrom).then(response => {
          this.$modal.msgSuccess("新增成功");
          this.openRe = false;
          this.zyfrom = {
            type: 1,
            updateType: '1',
          };

          this.zyfromWd = {
            updateType: '1',
            type: 2,
          };
          this.getResVeList();
        }).catch(error => {
          this.loading = false;
        });

      },



      /** 微端---更新资源提交按钮 */
      submitFormZygxWd: function() {
        this.zyfromWd.user = this.userId
        this.zyfromWd.type_pj = 1
        this.loading = true;
        this.zyfromWd.type = 2

        console.log('hhhhh微端提交', this.zyfromWd)
        Version.AddRes(this.zyfromWd).then(response => {
          this.$modal.msgSuccess("新增成功");
          this.openRe = false;

          this.zyfrom = {
            type: 1,
            updateType: '1',
          };

          this.zyfromWd = {
            updateType: '1',
            type: 2,
          };






          this.getList();
        }).catch(error => {
          this.loading = false;
        });

      },



      /** 正式服提交按钮 */
      submitFormZsf: function() {
        this.$refs["form_zfs"].validate(valid => {
          if (valid) {
            this.form_zfs.secret = this.secret
            this.form_zfs.user = this.userId
            this.form_zfs.game = this.userId
            this.form_zfs.nickname = this.nickname
            this.form_zfs.type_pj = 1
            this.form_zfs.state = 1

            this.loading = true;

            Version.Add(this.form_zfs).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open_gxbb = false;
              this.getList();
            }).catch(error => {
              this.loading = false;
            });
          }
        });



      },





      /** 提交按钮 */
      submitForm: function() {
        this.$refs['form'].validate(valid => {

          if (valid) {

            if (this.fileList.length > 0) {
              this.form.file_addr = this.fileList[0].response.data;
              this.form.file_name = this.fileList[0].name;
              this.form.size = this.fileList[0].size;
            }
            this.form.photo_type = 1;
            if (this.form.id != undefined) {
              Games.Update(this.form).then(response => {
                this.$modal.msgSuccess('修改成功');
                this.open = false;
                this.getList();
              });
            } else {
              Games.Add(this.form).then(response => {
                this.$modal.msgSuccess('新增成功');
                this.open = false;
                this.getList();
              });
            }
          }
        });
      },




      //联远修改提交
      nyUpdate() {
        var per = {
          id: this.id,
          operate_id: this.formNy.operate_id,
          size: this.form.size,
          file_addr: this.form.file_addr,
          file_name: this.form.file_name,
          test_formal: 1,
          operate_id: this.formNy.operate_id,
          logo: this.form.logo,
          remark: this.form.remark,
          photo: this.form.photo
        };

        Games.Update(per).then(response => {
          this.openNy = false;
          this.$modal.msgSuccess('更新成功');
          this.getList();
        });
      },

      //申请渠道提交
      channelUpdate() {
        var per = {
          id: this.formChannel.id,
          ulid: this.formChannel.ulid,
          title: this.formChannel.title,
          user: this.userId,
        };

        Evaluating.AppChannel(per).then(response => {
          this.openChannel = false;
          this.$modal.msgSuccess('提交成功');
          this.getList();
        });
      },


      //申请评测提交
      channelUpdateEva() {
        console.log('formEva-channelUpdateEva', this.formEva)
        // return;
        if (this.formEva.channel_state == 3) {
          this.$confirm('确定修改资料后重新提交？', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            })
            .then(() => {
              this.$refs['formEvaRef'].validate(valid => {
                if (valid) {
                  this.loading = true;
                  this.formEva.user = this.userId;
                  this.formEva.user_name = this.nickname;
                  this.formEva.settlement_ratio = this.settlement_ratio;
                  Evaluating.add(this.formEva).then(response => {
                    this.$modal.msgSuccess('申请成功');
                    this.openEva = false;
                    this.loading = false;
                    this.getList();
                  });
                }
              });
            })
            .catch(() => {});
        } else {
          this.$refs['formEvaRef'].validate(valid => {
            if (valid) {
              this.loading = true;
              this.formEva.user = this.userId;
              this.formEva.user_name = this.nickname;
              this.formEva.settlement_ratio = this.settlement_ratio;
              Evaluating.add(this.formEva).then(response => {
                this.$modal.msgSuccess('申请成功');
                this.openEva = false;
                this.loading = false;
                this.getList();
              });
            }
          });
        }



      },


      //获取平台
      getPlatform() {
        var per = {
          type_pj: 1
        }
        Evaluating.getPlatform(per).then(response => {
          console.log('platform', response.data.list)
          this.platform = response.data.list;

        });
      },


      //版本类型
      getGametype() {
        Evaluating.getGametype().then(response => {
          console.log('abc', response.data.rows)

          this.game_type = response.data.rows;

        });
      },

      //版本分类
      gameTypeChange(value) {
        var per = {
          type: value
        }
        Evaluating.getGameClass(per).then(response => {
          console.log('game_class', response.data.rows)
          this.game_class = response.data.rows;
        });
      },


      gxzy(row) {
        this.openGxzy = true;
        this.xzyyData = row;
        console.log('选中应用数据', this.xzyyData);
        this.getResVeList();
      },

      handleUpdateRe(row) {
        if (this.activeName == 'second') {
          this.title = '首包资源上传';
        }
        if (this.activeName == 'third') {
          this.title = '微端资源上传';
        }


        this.openRe = true;
        this.baoshow = 1;
        this.fileList = [];
        this.fileListMb = [];
        this.fileListSb = [];
        console.log('zyfrom-945', row)
        this.getResVeList(row.ulid)
        this.LastUpdatedTime(row.ulid)
        this.zyfrom.version = row.ulid
        this.zyfrom.versionNumber = row.version_id
        this.zyfrom.title = row.title


        this.zyfromWd.version = row.ulid
        this.zyfromWd.versionNumber = row.version_id
        this.zyfromWd.title = row.title


      },

      /** 上传版本按钮操作---正式服列表 */
      handleAddJust() {
        this.fileList = [];
        this.form_zfs = {};
        this.title = '上传版本';
        this.zsbwz = '点击上传';
        this.zsbwza = '版本上传入口';
        this.zsbwzb = 'logo上传';
        this.zsbwzc = '备注';
        this.open_gxbb = true;
        this.open_gxbb_title = false;
        this.generateVersionSecret();
      },
      /** 更新版本按钮操作---正式服列表 */
      handleUpdateJust(row) {

        row = Object.keys(row).reduce((filteredRow, key) => {
          if (row[key] !== null && row[key] != "" && key != "created_at" && key != "updated_at") {
            filteredRow[key] = row[key];
          }
          return filteredRow;
        }, {});


        this.fileList = [];
        this.$set(this.form_zfs, 'versionFile', '');
        this.$set(this.form_zfs, 'versionSize', '');

        this.title = '更新版本';
        this.zsbwz = '点击更新';
        this.zsbwza = '版本更新入口';
        this.zsbwzb = 'logo更新';
        this.zsbwzc = '备注更新';
        this.form_zfs = row;
        this.secret = row.secret;
        this.open_gxbb = true;
        this.open_gxbb_title = true;
      },

      /** 续费按钮操作 */
      xf(row) {
        this.open_xf = true;
      },





      /** 审核渠道按钮操作 */
      handleUpdateChannel(row) {
        console.log('row', row)

        if (row.evaluating && row.evaluating.channel_state == 2) {
          this.openChannel = true;
          this.formChannel.id = row.id
          this.formChannel.ulid = row.ulid
          this.formChannel.title = row.title
        } else {
          this.$message.error('请先通过评测');
        }

      },

      /** 评测按钮操作 */
      handleUpdateEva(row, type) {
        if (type == 1) {
          this.qkdis = false;
        } else {
          this.qkdis = true;
        }

        console.log('row', row)
        this.evaFiles = [];
        this.formEva = {};
        this.openEva = true;
        this.formEva.id = row.id
        this.formEva.game_id = row.ulid
        this.formEva.title = row.title
        if (row.evaluating) {
          this.formEva.ulid = row.evaluating.ulid
          this.formEva.annex = row.evaluating.annex
          // this.formEva.type = row.evaluating.type
          this.formEva.content = row.evaluating.content


          // this.formEva.platform = row.evaluating.platform
          this.$set(this.formEva, 'ratio', row.evaluating.ratio)
          this.$set(this.formEva, 'system', row.evaluating.system)
          this.$set(this.formEva, 'settlement_interval', parseFloat(row.evaluating.settlement_interval))

          console.log('formEva', this.formEva)

          this.$set(this.formEva, 'type', row.evaluating.type)
          this.gameTypeChange(row.evaluating.type);

          this.$set(this.formEva, 'class', row.evaluating.class)
          this.formEva.channel_state = row.evaluating.channel_state
          if (row.evaluating.channel_state == 3) {
            this.reasons = JSON.parse(row.evaluating.reasons) //评测失败原因
          }

          this.phopjcp(row.evaluating.gameimg);

          this.$set(this.formEva, 'apkadd', row.evaluating.apkadd)
          this.$set(this.formEva, 'pcadd', row.evaluating.pcadd)
        }

      },


      phopjcp(photo) {
        if (photo) {
          var temp = photo;
          console.log('temp_phopj', temp)
          console.log('temp.length', temp.length)
          if (temp.length > 0) {
            for (let t = 0; t < temp.length; t++) {
              //通过[{name: 'name', url: 'url地址'}]格式初始化照片墙
              this.evaFiles.push({
                url: temp[t],
                name: temp[t],
                response: {
                  code: 200,
                  data: temp[t]
                }
              });
              console.log('temp', this.evaFiles)
              if (t === 0) {
                this.formEva.gameimg = temp[t]
              } else {
                // 最终photo的格式是所有已上传的图片的url拼接的字符串（逗号隔开），根据实际需要修改格式
                this.formEva.gameimg += ',' + temp[t];
              }
            }
          }
        }
      },


      /** 联运修改按钮操作 */
      handleUpdateNy(row) {
        this.reset();
        const id = row.id;
        Games.Show(id).then(response => {
          console.log('handleUpdateNy', response.data);
          this.id = row.id;
          this.openNy = true;
          this.phopj(row.photo)
          this.$set(this.formNy, 'operate_id', response.data.operate_id);
          this.$set(this.form, 'file_addr', response.data.file_addr);
          this.$set(this.form, 'file_name', response.data.file_name);
          this.$set(this.form, 'size', response.data.size);

          this.$set(this.form, 'logo', response.data.logo);
          this.$set(this.form, 'remark', response.data.remark);
        });
      },

      /** 申请入库按钮操作 */
      handleUpdate(row) {
        this.reset();

        console.log('row', row.photo)
        this.phopj(row.photo)

        console.log('this.form.photo', this.form.photo)
        // console.log('Arr', Arr)
        this.id = row.id;
        this.$set(this.formNy, 'operate_id', row.operate_id);
        this.$set(this.form, 'file_addr', row.file_addr);
        this.$set(this.form, 'id', row.id);
        this.$set(this.form, 'file_name', row.file_name);
        this.$set(this.form, 'size', row.size);
        this.$set(this.form, 'logo', row.logo);
        this.$set(this.form, 'remark', row.remark);
        this.open = true;
      },

      phopj(photo) {
        if (photo) {
          var temp = photo.split(",");
          console.log('temp_phopj', temp)
          console.log('temp.length', temp.length)
          if (temp.length > 0) {
            for (let t = 0; t < temp.length; t++) {
              //通过[{name: 'name', url: 'url地址'}]格式初始化照片墙
              this.evaFiles.push({
                url: temp[t],
                name: temp[t],
                response: {
                  code: 200,
                  data: temp[t]
                }
              });
              if (t === 0) {
                this.formEva.photo = temp[t]
              } else {
                // 最终photo的格式是所有已上传的图片的url拼接的字符串（逗号隔开），根据实际需要修改格式
                this.formEva.photo += ',' + temp[t];
              }
            }
          }

        }
      },

      /** 切换按钮操作 */
      handleCut(row) {
        console.log('切换', row);
        const id = row.id;
        this.$modal
          .confirm('是否确认切换')
          .then(function() {
            return Games.Cut(id);
          })
          .then(() => {
            this.getList();
            this.game_name = row.file_name;
            this.$modal.msgSuccess('切换成功');
          })
          .catch(() => {});
      },

      /** 删除按钮操作 */
      handleDelete(row) {
        const id = row.id;
        this.$modal
          .confirm('是否确认删除')
          .then(function() {
            return Games.Delete(id);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess('删除成功');
          })
          .catch(() => {});
      },




      shuaxin() {
        this.getList();
        this.$message({
          message: '刷新成功',
          type: 'success',
          center: true,
        });
      },

      /** 新增按钮操作 */
      handleAdd() {
        this.reset();
        this.open_zsf = true;
        this.title = '添加正式服';
        if (this.tableData.length > 0) {
          var n1 = this.tableData[0]['version_id'];
          var version_id = Number(n1) + 1;
        } else {
          var version_id = this.user_id + '1';
        }
        this.$set(this.form_zfs, 'version_id', version_id);
      },

      /** 申请入库按钮操作 */
      handleRk() {
        this.reset();
        this.open = true;

      },
      // 取消按钮
      cancel() {
        this.openNy = false;
        this.open = false;
        this.open_zsf = false;
        this.reset();
      },
      // 表单重置
      reset() {
        this.fileList = [];
        this.form = {};
        this.formNy = {};
        this.form_zfs = {};
        this.editFiles = [];
        this.resetForm('form');
      },



    }
  };
</script>

<style lang="scss" scoped>
  .quxiao {
    ::v-deep .el-button {
      border: 1px solid #3FC1C9;
      color: #3FC1C9;
    }
  }



  ::v-deep .el-progress__text {
    width: 200px;
  }

  // ::v-deep .el-input--medium .el-input__inner {
  //   background: #f3f3f4;
  //   border: 0px solid #3e68c9;
  // }

  ::v-deep .el-textarea__inner {
    border: 0px solid #3e68c9;
    background-color: #f3f3f4;
  }

  .explain {
    line-height: 25px;
    color: red;
  }

  .dqqf {
    min-width: 100px;
    height: 34px;
    padding: 0 10px;
    background: #f8ede7;
    border-radius: 6px;

    font-size: 16px;

    font-weight: bold;
    color: #cc1a08;
  }

  .scwj {
    ::v-deep .el-button--mini {
      font-size: 16px;
      font-weight: bold;
      color: #fff;
    }
  }

  .pagss {
    height: 100%;
    background: #E4EEF9;
  }

  .avatar {
    width: 78px;
    height: 78px;
    display: block;
  }

  .panel-group1 {
    padding: 25px;
    margin-top: 18px;
    margin-bottom: 0px;
    margin-right: 15px;
    min-height: 220px;
    background: #ffffff;
    border-radius: 10px 10px 10px 10px;
    opacity: 1;
  }

  .panel-group2 {
    padding: 25px;
    margin-top: 18px;
    margin-bottom: 0px;
    margin-right: 15px;
    margin-left: 15px;
    min-height: 800px;
    background: #ffffff;
    border-radius: 10px 10px 10px 10px;
    opacity: 1;
  }

  .avatar-uploader-icon {
    font-size: 28px;
    color: #000000;
    width: 78px;
    height: 78px;
    line-height: 78px;
    text-align: center;
    background-color: #f4f4f5;
  }

  ::v-deep .el-divider--vertical {
    height: 100px;
  }

  ::v-deep .pagination-container .el-pagination {
    position: relative;
  }

  ::v-deep .el-form-item__content {
    // margin-left: 40px !important;
  }

  .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .yhbox {
    padding: 20px;
    width: 320px;
    height: 120px;
    background: #ffffff;
    // background: red;
    border-radius: 4px 4px 4px 4px;
    opacity: 1;
    border: 1px solid #bbbbbb;
  }

  ::v-deep .el-dialog__header {
    padding: 20px;
    padding-bottom: 0;
  }

  ::v-deep .el-progress__text {
    // width: 30px;
    white-space: nowrap;
    margin-right: -180px;

  }

  .panel-group2 {
    ::v-deep .el-tabs__item.is-active {
      color: #fff !important;
      background: #3FC1C9;
      padding-left: 20px;
    }
  }


  ::v-deep .el-tabs__item:hover {
    color: #3FC1C9;
  }


  ::v-deep .el-tabs--top .el-tabs__item.is-top:nth-child(2),
  .el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
  .el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
  .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2) {
    padding-left: 20px;
  }

  ::v-deep .el-tabs--top .el-tabs__item.is-top:last-child,
  .el-tabs--top .el-tabs__item.is-bottom:last-child,
  .el-tabs--bottom .el-tabs__item.is-top:last-child,
  .el-tabs--bottom .el-tabs__item.is-bottom:last-child {
    padding-right: 20px;
  }

  .moeyy {
    width: 130px;
    height: 130px;
    background: #F3F3F4;
    border-radius: 5px;
    color: #000000;
  }

  .moey {
    background: #3FC1C9 !important;
    color: #fff;
  }

  ::v-deep .el-upload-list__item-name {
    // margin-bottom: 8px;
  }

  ::v-deep .el-button:hover,
  .el-button:focus {
    color: #000000;
    border-color: #A5EDF1;
    background-color: #A5EDF1;
  }


  ::v-deep .el-button:hover,
  .el-button:focus {
    color: #000000;
    border-color: #A5EDF1;
    background-color: #A5EDF1;
  }

  ::v-deep .el-button:hover,
  .el-button:focus {
    color: #000000;
    border-color: #A5EDF1;
    background-color: #A5EDF1;
  }



  ::v-deep .el-tabs__item.is-active {
    color: #000;
  }

  ::v-deep .el-tabs__item:hover {
    color: #3FC1C9;
  }

  ::v-deep .el-tabs__active-bar {
    background-color: #3FC1C9;
    margin-left: -20px;
  }

  .mmm {
    ::v-deep .el-tabs__active-bar {
      margin-left: 0px;
    }
  }

  .txxbutton {
    ::v-deep .el-button--medium {
      width: 146px;
      height: 52px;
      padding: 10px 20px;
      font-size: 20px;
      border-radius: 4px;
    }
  }

  .ggzz {
    margin-left: 50px;
    padding: 10px;
    width: 250px;
    height: 38px;
    background: #F3F3F4;
    border-radius: 5px;
  }

  .shuxia {
    width: 4px;
    height: 28px;
    background: #3fc1c9;
    margin-right: 10px;
  }


  ::v-deep .el-button--primary {
    color: #FFFFFF;
    background-color: #3FC1C9;
    border-color: #3FC1C9;
  }


  ::v-deep .el-upload-dragger {
    width: 100% !important;
  }


  .upload-demo {
    width: 100%;
  }

  ::v-deep .el-upload {
    width: 100%;
  }

  .zymc {
    width: 90px;
  }

  ::v-deep .el-tabs__active-bar {
    margin-left: 0px;
  }
</style>
